import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

@SuppressWarnings("serial")
public class Muutujavahetusega_Alus extends JPanel implements ActionListener {
	JButton tagasi;
	JPanel ylemine;

	public Muutujavahetusega_Alus() {
		setLayout(new BorderLayout(3, 3));
		ylemine = new JPanel();
		ylemine.setLayout(new FlowLayout(FlowLayout.LEFT));
		tagasi = new JButton("<< TAGASI");
		tagasi.addActionListener(this);
		ylemine.add(tagasi);
		ylemine.setBorder(BorderFactory.createEtchedBorder());
		
		add(ylemine, BorderLayout.NORTH);
		ImageIcon pilt = null;
		try {
			pilt = Ikoonilaadija.annaIkoon("Valemid/muutujavahetusega.gif");
		} catch (Exception e) {
			System.out.println("mingi porr");
		}
		add(new JLabel(pilt), BorderLayout.CENTER);
	}

	public void actionPerformed(ActionEvent e) {
		if (e.getActionCommand() == "<< TAGASI") {
			this.setVisible(false);
		}
	}

}

